[][src]Crate dbus

D-Bus bindings for Rust

D-Bus is a message bus, and is mainly used in Linux for communication between processes. It is present by default on almost every Linux distribution out there, and runs in two instances - one per session, and one system-wide.

In addition to the API documentation, which you're currently reading, you might want to look in the examples directory, which contains many examples and an argument guide. README.md also contain a few quick "getting started" examples.

In addition to this crate, there are two companion crates, dbus-codegen for generating Rust code from D-Bus introspection data, and dbus-tokio for integrating D-Bus with Tokio. However, at the time of this writing, these are far less mature than this crate.

Modules

arg

Types and traits for easily getting a message's arguments, or appening a message with arguments.

stdintf

This module contains some standard interfaces and an easy way to call them.

tree

Contains functionality for dispatching methods on a D-Bus "server".

Structs

BusName

A wrapper around a string that is guaranteed to be a valid D-Bus bus name.

ConnMsgs

Iterator over incoming messages on a connection.

ConnPath

A convenience struct that wraps connection, destination and path.

Connection

A D-Bus connection. Start here if you want to get on the D-Bus!

ConnectionItems

ConnectionItem iterator

Error

D-Bus Error wrapper.

ErrorName

A wrapper around a string that is guaranteed to be a valid D-Bus bus name.

Interface

A wrapper around a string that is guaranteed to be a valid D-Bus interface name.

MatchRule

A "match rule", that can match Messages on its headers.

Member

A wrapper around a string that is guaranteed to be a valid D-Bus member, i e, a signal or method name.

Message

A D-Bus message. A message contains some headers (e g sender and destination address) and a list of MessageItems.

MessageItemArray

An array of MessageItem where every MessageItem is of the same type.

MsgHandlerResult

The result from MsgHandler::handle.

OwnedFd

An RAII wrapper around Fd to ensure that file descriptor is closed when the scope ends.

Path

A wrapper around a string that is guaranteed to be a valid D-Bus object path.

PropHandler

Wrapper around Props that keeps a map of fetched properties.

Props

Client side properties - get and set properties on a remote application.

Signature

A wrapper around a string that is guaranteed to be a valid (single) D-Bus type signature. Supersedes TypeSig.

Watch

A file descriptor, and an indication whether it should be read from, written to, or both.

Enums

ArrayError

Errors that can happen when creating a MessageItem::Array.

BusType
ConnectionItem

When listening for incoming events on the D-Bus, this enum will tell you what type of incoming event has happened.

MessageItem

MessageItem - used as parameters and return values from method calls, or as data added to a signal (old, enum version).

MessageType
MsgHandlerType

Type of messages to be handled by a MsgHandler.

NameFlag

Flags to use for Connection::register_name.

ReleaseNameReply
RequestNameReply
WatchEvent

A file descriptor to watch for incoming events (for async I/O).

Traits

FromMessageItem

Helper trait for MessageItem::inner()

MsgHandler

A trait for handling incoming messages.

SignalArgs

Helper methods for structs representing a Signal

Type Definitions

MessageCallback

The type of function to use for replacing the message callback.

TypeSigDeprecated

A TypeSig describes the type of a MessageItem.